#version 450 core
#ifdef GL_ES
precision highp float;
#endif
layout(location = 0) in vec2 vTexCoord;

layout(location = 0) out vec4 fragColor;

layout(std140, binding = 0) uniform buf {
    mat4 qt_Matrix;
    float qt_Opacity;
} ubuf;

layout(binding = 1) uniform sampler2D uSource1;


void main()
{
    //fragColor = vec4(1.0, 0.0, 0.0, 1.0);
    //if(vTexCoord.y > 0.7){
    //    fragColor = vec4(1.0, 0.0, 0.0,1.0);
    //}
    //else if(vTexCoord.y > 0.5){
    //    fragColor = vec4(0.0, 1.0, 0.0, 1.0);
    //}
    //else if(vTexCoord.y > 0.2){
    //    fragColor = vec4(0.0, 0.0, 1.0, 1.0);        
    //}
    //else{
    //    fragColor = vec4(1.0, 1.0, 0.0, 1.0);
    //}
    fragColor = texture(uSource1, vTexCoord) * ubuf.qt_Opacity;
}